package com.tamo.ppresta.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.gyf.immersionbar.BarHide;
import com.gyf.immersionbar.ImmersionBar;
import com.tamo.ppresta.R;
import com.tamo.ppresta.base.BaseActivity;
import com.tamo.ppresta.util.ButtonUtils;
import com.tamo.ppresta.util.MyUtils;
import com.tamo.ppresta.util.ToastUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author yeyang
 * @name ppresta
 * @class name：com.tamo.ppresta.activity
 * @class describe
 * @time 2022/12/21 17:10
 * @change
 * @chang time
 * @class describe
 */
public class FeedbackActivity extends BaseActivity {
    @BindView(R.id.iv_feedback_photo1)
    ImageView mIvFeedbackPhoto1;
    @BindView(R.id.iv_feedback_photo_delete1)
    ImageView mIvFeedbackPhotoDelete1;
    @BindView(R.id.rl_feedback_delete1)
    RelativeLayout mRlFeedbackDelete1;
    @BindView(R.id.iv_feedback_photo2)
    ImageView mIvFeedbackPhoto2;
    @BindView(R.id.iv_feedback_photo_delete2)
    ImageView mIvFeedbackPhotoDelete2;
    @BindView(R.id.rl_feedback_delete2)
    RelativeLayout mRlFeedbackDelete2;
    @BindView(R.id.iv_feedback_photo3)
    ImageView mIvFeedbackPhoto3;
    @BindView(R.id.iv_feedback_photo_delete3)
    ImageView mIvFeedbackPhotoDelete3;
    @BindView(R.id.rl_feedback_delete3)
    RelativeLayout mRlFeedbackDelete3;
    @BindView(R.id.ll_feedback_photo)
    LinearLayout mLlFeedbackPhoto;
    @BindView(R.id.et_feedback)
    EditText mEtFeedback;
    @BindView(R.id.tv_feedback_edit_num)
    TextView mTvFeedbackEditNum;
    @BindView(R.id.rl_feedback_edit)
    RelativeLayout mRlFeedbackEdit;
    @BindView(R.id.tv_enviar)
    TextView mTvEnviar;
    @BindView(R.id.tv_feedback_tip)
    TextView mTvFeedbackTip;
    @BindView(R.id.iv_title_back)
    ImageView mIvTitleBack;
    @BindView(R.id.rl_title_back)
    RelativeLayout mRlTitleBack;
    @BindView(R.id.tv_title_name)
    TextView mTvTitleName;

    @Override
    protected int setLayout() {
        return R.layout.activity_feedback;
    }

    @Override
    protected void setView() {
        mRlTitleBack.setOnClickListener(this::onClick);
        mIvFeedbackPhoto1.setOnClickListener(this::onClick);
        mIvFeedbackPhotoDelete1.setOnClickListener(this::onClick);
        mIvFeedbackPhoto2.setOnClickListener(this::onClick);
        mIvFeedbackPhotoDelete2.setOnClickListener(this::onClick);
        mIvFeedbackPhoto3.setOnClickListener(this::onClick);
        mIvFeedbackPhotoDelete3.setOnClickListener(this::onClick);
        mTvEnviar.setOnClickListener(this::onClick);
    }

    @Override
    protected void setData() {

    }

    @Override
    public void onClick(View v) {
        ButtonUtils.isFastDoubleClick();
        switch (v.getId()) {
            case R.id.rl_title_back:
                finish();
                break;
            case R.id.iv_feedback_photo1:
                ToastUtil.showShort(this, "添加第一张图片");
                break;
            case R.id.iv_feedback_photo_delete1:
                ToastUtil.showShort(this, "删除第一张图片");
                break;
            case R.id.iv_feedback_photo2:
                ToastUtil.showShort(this, "添加第二张图片");
                break;
            case R.id.iv_feedback_photo_delete2:
                ToastUtil.showShort(this, "删除第二张图片");
                break;
            case R.id.iv_feedback_photo3:
                ToastUtil.showShort(this, "添加第三张图片");
                break;
            case R.id.iv_feedback_photo_delete3:
                ToastUtil.showShort(this, "删除第三张图片");
                break;
            case R.id.tv_enviar:
                ToastUtil.showShort(this, "提交");
                break;
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        setStatusBar();
        ButterKnife.bind(this);
    }

    private void setStatusBar() {
        MyUtils.setStatusBarVisible(this);
        ImmersionBar.with(this)
                .fitsSystemWindows(true)
                .transparentStatusBar()
                .statusBarColor(R.color.white)
                .statusBarDarkFont(false)
                .hideBar(BarHide.FLAG_HIDE_NAVIGATION_BAR)
                .keyboardEnable(true)
                .init();
    }
}